package com.example.servicelogin.exception;


import com.example.entity.vo.ResponseVO;
import com.example.servicelogin.controller.ABaseController;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;


//全局异常处理
@RestControllerAdvice
public class AGlobalExceptionHandler extends ABaseController {

//    private static final Logger logger = LoggerFactory.getLogger(AGlobalExceptionHandler.class);
//
////    算数异常处理
//    @ExceptionHandler(ArithmeticException.class)
//    public ResponseVO arithmeticException(ArithmeticException e) {
////        自定义处理
//        System.out.println("ArithmeticException");
//        return getBusinessErrorResponseVO(e);
//    }
//
//    //    全局父异常处理
//    @ExceptionHandler(Exception.class)
//    public ResponseVO Exception(Exception e) {
////        自定义处理
//        System.out.println("Exception");
//        return getBusinessErrorResponseVO(e);
//    }
}
